package ch1;

public class Zuoye030812 {
    public static void main(String[] args) {
        int i=1000;
        int b;
        while (i>=1000&&i<10000){
            b=(i/1000)*(i/1000)*(i/1000)*(i/1000)+(i/100%10)*(i/100%10)*(i/100%10)*(i/100%10)+(i/10%10)*(i/10%10)*(i/10%10)*(i/10%10)+(i%10)*(i%10)*(i%10)*(i%10);
            if (b==i){
                System.out.println(b);
            }
            i++;
        }
    }
}
